package com.fg.action;


import java.util.HashMap;
import java.util.Map;

import org.apache.struts2.ServletActionContext;
import org.springframework.beans.factory.annotation.Autowired;

import com.fg.dao.TestDao;
import com.fg.model.TestModel;
import com.opensymphony.xwork2.ActionSupport;

/**
 * 
 * @Package	: com.fg.action
 * @File 	: testAction.java
 *
 * @Author 	: JosephChoi
 * @Date	: 2011. 8. 13.
 * @Version : 
 * @Comment	: test Action
 *
 */
public class TestAction extends BaseAction{
	@Autowired
	private TestDao testDao;
	
	
	public String test() throws Exception{
		String email = parameters.get("email");
		String password = parameters.get("password");
		
		Map data = new HashMap();
		data.put("email", email);
		data.put("password", password);
		
		
		
		
		
		
		TestModel testModel = testDao.getTestFromEmail(email);
		
		if(testModel == null){
			return ERROR;
		}
		
		resultMap.put("testModel", testModel);
		
		return SUCCESS;
	}
	
	
}
